#include <iostream>

void auto_func()
{
    int a = 100;
    int b = 1024;

    auto c = a + b;
    auto i = 0, *p = &i;

    // error example
    // auto sz = 0, pi = 3.14;

    const int ma = 1;

    // auto skip if the variable is top-levelconst
    const auto f = ma;

    auto &g = a; // error using: auto &h = 100;

    const auto &j = 100;

    // Example 2: auto
    const int ci = 233;
    auto k = ci, &l = i;

    // auto &m = ci, *k = &ci;

    int i = 0;

    // auto &n = i, *p2 = &ci;
}

int main(void)
{
    auto_func();
    return 0;
}